function populateFields(row){
		document.getElementById("id").value=row.cells[0].innerHTML;
		document.getElementById("firstName").value=row.cells[2].innerHTML;
		document.getElementById("lastName").value=row.cells[3].innerHTML;
		document.getElementById("homeNumber").value=row.cells[4].innerHTML;	
		document.getElementById("cellNumber").value=row.cells[5].innerHTML;
		document.getElementById("email").value=row.cells[6].innerHTML;	
		document.getElementById("rank").value=row.cells[7].innerHTML;
		document.getElementById("description").value=row.cells[8].innerHTML;
		document.getElementById("userType").value = row.cells[9].innerHTML;
	
	    
	
		
	}
	
	function validate(){
		var alertPosName=document.getElementByName("alertPositionName").value;
		var alertNrP=document.getElementByName("alertNrPersons").value;
		var positionName=document.getElementById("name").value;
		var nrPersons=document.getElementById("nrPersons").value;
		if(positionName==null || positionName==""){
			alert(alertPosName);
			document.getElementById("name").focus();
			return false;
		}
		if(nrPersons==""){
			alert(alertNrP);
			document.getElementById("nrPersons").focus();
			return false;
		}
	}
	
	
	function sendReq(){
			var xmlhttp=new XMLHttpRequest();
			xmlhttp.open("POST","./UserServlet",true);
			xmlhttp.send();
	}